/**
 * 2010(c) Copyright Oceansoft Information System Co.,LTD. All rights reserved.
 * <p>
 * Compile: JDK 1.6+
 * <p>
 * 版权所有(C)：江苏欧索软件有限公司
 * <p>
 * 公司名称：江苏欧索软件有限公司
 * <p>
 * 公司地址：中国苏州科技城青山路1号
 * <p>
 * 网址: http://www.oceansoft.com.cn
 * <p>
 * 版本: 苏州公安统一用户管理平台1.0
 * <p>
 * 作者: 090922(陈伟)
 * <p>
 * 文件名:SysRole.java
 * <p>
 * 类产生时间: 2012-5-23 下午4:18:04
 * <p>
 * 负责人: 090922(陈伟)
 * <p>
 * Email:javacspring@gmail.com
 * <p>
 * 所在组 : 苏州公安统一用户管理平台
 * <p>
 * 所在部门: 电信/国土——技术二部
 * <p>
 * <p>
 */
package com.oceansoft.core.domain;

import java.io.Serializable;
import java.util.Date;

/**
 * 系统角色表
 * 
 * @author chenw
 * 
 */
public class SysRole implements Serializable, Comparable<SysRole> {
	/**
	 * 
	 */
	private static final long serialVersionUID = 8905660489239121565L;
	private long dbid;
	private String rcode = "0";
	private String rname;
	private String alias;
	private int ordernum;
	private String activeflag;
	private String description;
	private String remark;
	private Date cdate = new Date();// 创建时间
	private int appNum;// 使用系统数

	public SysRole() {
		super();
	}

	public SysRole(long dbid, String rcode, String rname, int ordernum, String activeflag, String remark, Date cdate) {
		super();
		this.dbid = dbid;
		this.rcode = rcode;
		this.rname = rname;
		this.ordernum = ordernum;
		this.activeflag = activeflag;
		this.remark = remark;
		this.cdate = cdate;
	}

	public SysRole(long dbid, String rcode, String rname, String alias, int ordernum, String activeflag,
			String description, String remark) {
		super();
		this.dbid = dbid;
		this.rcode = rcode;
		this.rname = rname;
		this.alias = alias;
		this.ordernum = ordernum;
		this.activeflag = activeflag;
		this.description = description;
		this.remark = remark;
	}

	public long getDbid() {
		return dbid;
	}

	public void setDbid(long dbid) {
		this.dbid = dbid;
	}

	public String getRcode() {
		return rcode;
	}

	public void setRcode(String rcode) {
		this.rcode = rcode;
	}

	public String getRname() {
		return rname;
	}

	public void setRname(String rname) {
		this.rname = rname;
	}

	public String getAlias() {
		return alias;
	}

	public void setAlias(String alias) {
		this.alias = alias;
	}

	public int getOrdernum() {
		return ordernum;
	}

	public void setOrdernum(int ordernum) {
		this.ordernum = ordernum;
	}

	public String getActiveflag() {
		return activeflag;
	}

	public void setActiveflag(String activeflag) {
		this.activeflag = activeflag;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public Date getCdate() {
		return cdate;
	}

	public void setCdate(Date cdate) {
		this.cdate = cdate;
	}

	public int getAppNum() {
		return appNum;
	}

	public void setAppNum(int appNum) {
		this.appNum = appNum;
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append(dbid);
		builder.append("&nbsp;&nbsp;&nbsp;");
		builder.append(rcode);
		builder.append("&nbsp;&nbsp;&nbsp;");
		builder.append(rname);
		builder.append("&nbsp;&nbsp;&nbsp;");
		builder.append(alias);
		builder.append("&nbsp;&nbsp;&nbsp;");
		builder.append(ordernum);
		builder.append("&nbsp;&nbsp;&nbsp;");
		builder.append(activeflag);
		builder.append("&nbsp;&nbsp;&nbsp;");
		builder.append(description);
		builder.append("&nbsp;&nbsp;&nbsp;");
		builder.append(remark);
		builder.append("&nbsp;&nbsp;&nbsp;");
		builder.append(cdate);
		builder.append("&nbsp;&nbsp;&nbsp;");
		builder.append(appNum);
		return builder.toString();
	}

	/**
	 * 比较
	 */
	@Override
	public int compareTo(SysRole o) {
		return this.getRcode().compareTo(o.getRcode());
	}
}
